<div class="col-md-12">
  <div class="box box-primary">
    <div class="box-header with-border">
      <h3 class="box-title">Inbox</h3>

      <div class="box-tools pull-right">
        <div class="has-feedback">
          <input class="form-control input-sm" ng-model="query.$" placeholder="Search Mail" type="text">
          <span class="glyphicon glyphicon-search form-control-feedback"></span>
        </div>
      </div>
      <!-- /.box-tools -->
    </div>
    <!-- /.box-header -->
    <div class="box-body no-padding">
      <div class="mailbox-controls">
        <button class="btn btn-primary btn-sm" ui-sref="^.add">新建1</button>
        <button class="btn btn-primary btn-sm" ng-click="add()">新建2</button>
        <button class="btn btn-default btn-sm" ng-click="delete()">删除</button>
        <div class="pull-right">
          {{offset+1}}-{{offset+list.length}}/{{count}}
          <div class="btn-group">
            <button class="btn btn-default btn-sm" ng-disabled="offset===0" ng-click="previous()"><i class="fa fa-chevron-left"></i></button>
            <button class="btn btn-default btn-sm" ng-disabled="offset+limit>=count" ng-click="next()"><i class="fa fa-chevron-right"></i></button>
          </div>
          <!-- /.btn-group -->
        </div>
        <!-- /.pull-right -->
      </div>
      <div class="table-responsive mailbox-messages">
        <table class="table table-hover table-striped">
          <tbody>
          <tr>
            <td>
              <input type="checkbox" ng-model="checkAll" ng-click="toggle(checkAll,list)"/>
            </td>
            <th>id</th>
            <th>名字</th>
            <td>邮箱</td>
            <td>密码</td>
            <td style="width: 39px"></td>
          </tr>
          <tr ng-repeat="item in list |filter:query |orderBy:'-id'" >
            <td><input type="checkbox" ng-model="item.ck"/></td>
            <td>{{item.id}}</td>
            <td><a ui-sref="^.view({id:item.id})">{{item.name | uppercase}}</a></td>
            <td>{{item.email}}</td>
            <td>{{item.password}}</td>
            <td>
              <button class="btn btn-default btn-sm" ng-click="delete([item.id],true)"><i class="fa fa-remove"></i></button>
            </td>
          </tr>
          </tbody>
        </table>
        <!-- /.table -->
      </div>
      <!-- /.mail-box-messages -->
    </div>
    <!-- /.box-body -->
  </div><!-- /. box -->
</div><!-- /.col -->
<ng-include src=" 'modules/base/views/users/modal_form.html' "/>
